import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useItemStore = defineStore('itemStore', () => {
  const itemId = ref(''); // 存储商品 ID

  const setItemId = (newId: string) => {
    itemId.value = newId; // 更新商品 ID
  };

  return {
    itemId,
    setItemId,
  };
});
